<?php

/**
 * mint预定义属性
 * 
 * @version $Id: IMintProperties.php 312 2008-04-23 16:29:38Z iwind $
 * @package util.mint
 */
class IMintProperties extends IObject {
	/**
	 * 判断属性是否存在
	 *
	 * 在本类中，该方法恒返回true
	 * 
	 * @param string $varname 属性名
	 * @return boolean
	 */
	public function __isset($varname) {
		return true;
	}

	/**
	 * 取得属性值
	 *
	 * @param string $varname 属性名
	 * @return mixed
	 */
	public function __get($varname) {
		switch ($varname) {
			case "now":
				return time();
			case "version":
				return IMintConfig::VERSION;
			case "request":
				return IObjectFactory::getSingleObject("in");
			case "const":
				return IObjectFactory::getSingleObject("IMintConsts");
			case "config":
				global $_CONFIG;
				return $_CONFIG;
		}
	}
}


?>